<div id="most-viewed-side-panel">
<script type="text/javascript">
$('#most-viewed-cycle').find('ul').cycle({
	fx : 'scrollHorz',
	speed : 800,
	timeout : 6500,
	pager : '#most-viewed-pager',
	pagerAnchorBuilder : function(idx, slide) {
		return '#most-viewed-pager a:eq(' + idx + ')';
	}
});
</script>
	<h2>Most&nbsp;&nbsp;Viewed&nbsp;&nbsp;Articles</h2>
	<div id="most-viewed-cycle">
		<ul style="position: relative; overflow: hidden;">
			<?php
				$tableInfo = Zend_Registry::get('database')->mostviewed;
				foreach ($this->mostviewed as $value) {
			?>
			<li>
				<a href="<?php echo $value[$tableInfo->titlelink];?>"><img src="<?php echo $value[$tableInfo->picurl];?>" alt="<?php echo $value[$tableInfo->title];?>" title="<?php echo $value[$tableInfo->title];?>"></a>
				<h2><a href="<?php echo $value[$tableInfo->titlelink];?>"><span><?php echo $value[$tableInfo->title];?></span></a> | <a href="<?php echo $value[$tableInfo->categorylink];?>"><?php echo $value[$tableInfo->category];?></a></h2>
			</li>
			<?php }?>
		</ul>
	</div>
	<div id="most-viewed-pager" class="clearfix">
		<?php for($i = 1; $i <= count($this->mostviewed); $i++) {?>
			<a href="javascript:void(0);" class="ir"><?php echo $i;?></a>
		<?php }?>
	</div>
</div>